<link type="text/css" rel="stylesheet" href="{url:#css/ucenter.css}" />
{echo:JS::import('form');}
{echo:JS::import('dialog?skin=simple');}
{echo:JS::import('dialogtools');}
<div class="mt10 clearfix" style="position: relative;">
	{widget:name=sub_navs action=ucsidebar sidebar=$sidebar act=$actionId}
	<div class="content clearfix uc-content">

		<div class="box p10">
			<h1 class="title"><span>{lang:SHIPPING_ADDRESS}：</span></h1>
			
			{if:isset($msg)}
			<div class="message_{$msg[0]} ie6png">{$msg[1]}</div>
			{elseif:isset($validator)}
			<div class="message_warning ie6png">{$validator['msg']}</div>
			{/if}
			<div class="mt20 tr"><a id="address_other" class="btn btn-mini" href="javascript:;">{lang:ADD_ADDRESS}</a></div>
			<div class="mt10">
			<table class="simple address-list">
				<tr>
					<th>{lang:CONSIGNEE}</th> <th>{lang:REGION}</th> <th>{lang:STREET}</th> <th>{lang:ZIP_CODE}</th> <th>{lang:TELEPHONE}</th><th></th> <th>{lang:OPERATION}</th>
				</tr>
				{list:items=$address}
				<tr {if:$key%2==1}class="odd"{/if}>
					<td>{$item['accept_name']}</td> <td>{$parse_area[$item['province']]},{$parse_area[$item['city']]},{$parse_area[$item['county']]}</td> <td>{$item['addr']}</td> <td>{$item['zip']}</td> <td>{$item['mobile']}/{$item['phone']} </td><td>{if:$item['is_default']==1}<b>{lang:DEFAULT_ADDRESS}</b>{/if}</td> <td><a  href="javascript:;" data-value="{$item['id']}" class="modify">{lang:EDIT}</a> | <a href="javascript:confirm_action('{url:/ucenter/address_del/id/$item[id]}')">{lang:DELETE}</a></td>
				</tr>
				{/list}
			</table>
			<div class="mt10">{lang:SAVE_UP_20}</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">

$("#address_other").on("click",function(){
    art.dialog.open('{url:/simple/address_other}',{width:960,height:440,lock:true});
    return false;
})

  $(".address-list .modify").each(function(){
  	
    $(this).on("click",function(){
        var id = $(this).attr("data-value");
        art.dialog.open('{url:/simple/address_other/id/}'+id,{width:960,height:450,lock:true});
    });
});
</script> 